1. Field of the Invention
The present invention relates to an image processing device, an imaging device, an image processing method, and an image processing program, and particularly, to a technology that is applied to white balance correction.
2. Description of the Related Art
As a method of correcting auto white balance (AWB) of a digital camera, a method of specifying a type of light source of a scene from information such as “color distribution of an imaging signal” or “brightness of a scene” and performing white balance correction on an imaging signal on the basis of a white balance (WB) gain (a WB gain for canceling color of a light source) suitable for the specified type of light source is common. However, in an actual imaging scene, “object color” such as “green of trees” or “skin of a person” is included, and the “object color” hinders estimation of the type of light source.
For example, a “skin of a person imaged in sunlight” and “color of tungsten light (color of achromatic object imaged under tungsten light)” have a similar color distribution, and a determination of the type of light source is difficult.
In order to solve this problem and improve AWB performance, it is important to estimate “object color=original subject color.”
Conventionally, a digital imaging device in which object color component data corresponding to image data in which an influence of the illumination environment is removed is acquired, and the acquired object color component data is combined with arbitrary illumination component data in order to enable reproduction of an image for which an illumination environment is changed has been proposed (Patent documents 1 and 2).
In acquisition of the object color component data, object color component data substantially corresponding to spectral reflectance at each position (each pixel) on the subject is acquired using difference image data (image data influenced by flash light) indicating a difference between first image data captured under an illumination environment in which a flash is ON and second image data captured under an illumination environment in which the flash is OFF, and flash spectral data.
Further, if object color component data is acquired, then illumination component data indicating an influence of an illumination environment that does not include flash light is generated from the object color component data and the second image data. This illumination component data is used in a case where an image serving as a basis of the object color component data is reproduced, but an image for which the illumination environment is changed is likely to be reproduced due to a combination of the object color component data with arbitrary illumination component data.